<form action="news.manage.php" id="form_add" name="form_add" method="post">
	<input type="hidden" name="action" value="save_js" />
    <table border="0" cellpadding="0" cellspacing="0" class="from_table">
		<tr>
		  <th width="20%"><tpl> $langSysNJsClass </tpl></th>
		  <td width="480" align="left"><tpl> $slCId </tpl></td>
		</tr>
		<tr>
		  <th width="20%"><tpl> $langSysNJsOrderBy </tpl></th>
		  <td width="480" align="left" ><tpl> $slOrder </tpl></td>
		</tr>
		<tr>
		  <th width="20%"><tpl> $langSysNJsCharNum </tpl></th>
		  <td width="480" align="left" ><input name="txtcharnum" type="text" id="txtcharnum"class="txtinput " maxlength="11" />&nbsp;&nbsp;<tpl> $langSysNChar </tpl></td>
		</tr>
		<tr>
		  <th width="20%"><tpl> $langSysNJsLineNum </tpl></th>
		  <td width="480" align="left"><input name="txtlinenum" type="text" id="txtlinenum" class="txtinput " maxlength="6" /></td>
		</tr>
		
  </table>
   <div class="table-5-bottom">
  <div class="table-button">
			<span class="btn_left">
				<input type="submit" class="btn_submit" name="Submit" value="<tpl> $langSysNSubmit </tpl>" />
			  </span>
				<span class="btn_left">
		  <input type="button" class="btn_submit" name="return_list" id="return_list" value="<tpl> $langSysNReturn </tpl>" /></span>			</div>
		  </div>
</form>

<script>
$(document).ready(function() {
	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ST(4,4);
								ShowDiv	= 'result_content';
								getPageContent("news.manage.php?action=ajax_js_list");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_add").validate({
		errorClass: "wrong",
		rules: {
			txtcharnum: {required: true,number: true,min: 1},
			txtlinenum: {required: true,number: true,min: 1}
		},
		messages: {
			txtcharnum: {required: "<tpl> $langSysNJsCharIsWrong </tpl>",number: "<tpl> $langSysNJsCharIsWrong </tpl>",min: "<tpl> $langSysNJsCharIsWrong </tpl>"},
			txtlinenum: {required: "<tpl> $langSysNJsLineIsWrong </tpl>",number: "<tpl> $langSysNJsLineIsWrong </tpl>",min: "<tpl> $langSysNJsLineIsWrong </tpl>"}
		},
		submitHandler: function() {
			$('#form_add').ajaxSubmit(options);
		}
	});
	
	$("#return_list").click(function(){
		ST(4,4);
		ShowDiv	= 'result_content';
		getPageContent("news.manage.php?action=ajax_js_list");
	});
});
</script>